package ocean.chinacraft.client.entity.render;

import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.entity.EntityRendererManager;
import net.minecraft.client.renderer.entity.MobRenderer;
import net.minecraft.util.ResourceLocation;
import ocean.chinacraft.client.entity.model.SkyLanternModel;
import ocean.chinacraft.common.constants.Constants;
import ocean.chinacraft.common.entity.fly.SkyLanternEntity;

/**
 * 孔明灯渲染器
 *
 * @author zhang
 * @since 2021/12/29
 */
public class RenderSkyLantern extends MobRenderer<SkyLanternEntity, SkyLanternModel<SkyLanternEntity>> {

    private static final ResourceLocation SKY_LANTERN = new ResourceLocation(Constants.MOD_ID, "textures" +
            "/entity/sky_lantern.png");

    public RenderSkyLantern(EntityRendererManager manager) {
        super(manager, new SkyLanternModel<>(), 1.5F);
    }

    @Override
    public ResourceLocation getTextureLocation(SkyLanternEntity entity) {
        return SKY_LANTERN;
    }

    @Override
    protected void scale(SkyLanternEntity skyLantern, MatrixStack matrixStack, float v) {
        matrixStack.scale(4.5F, 4.5F, 4.5F);
    }
}